import sys
from PyQt4 import QtGui, QtCore


class QuitButton(QtGui.QWidget):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)

        self.setGeometry(300, 300, 250, 150)
        self.setWindowTitle('Quit button')

        self.bquit = QtGui.QPushButton('Close', self)
        self.bquit.setGeometry(150, 100, 60, 35)
        
        self.lineA = QtGui.QLineEdit(self)
        self.lineA.setGeometry(2, 2, 100, 50)

        #self.connect(quit, QtCore.SIGNAL('clicked()'),
        #    QtGui.qApp, QtCore.SLOT('quit()'))
        self.connect(self.bquit, QtCore.SIGNAL("clicked()"), self.gettext)


        
    def gettext(self):
        print self.lineA.text()
        print "Hello"
        #pass


app = QtGui.QApplication(sys.argv)
qb = QuitButton()
qb.show()
sys.exit(app.exec_())

